home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / TIMER.HDR < prev    next >
Text File  |  1994-04-25  |  3KB  |  78 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Timer(nChannel, nAction, nOptVal) --> nTimerData
  8.  
  9. PARAMETERS:
  10.  
  11. nChannel: Timer Channel Number (1-16 DEAFAULT: 1)
  12. nAction : Timer Action:
  13.  
  14.         KT_RESET   Reset specified timer to ZERO
  15.         KT_START   Start specified timer
  16.         KT_STOP    Stop specified timer
  17.         KT_READ    Read specified timer
  18.         KT_SET_TO  Set nChannel to the value in nSet
  19.         KT_SWITCH  Stop other channels & start channel nChannel
  20.         KT_ASSIGN  Set specified timer to a specific value.
  21.  
  22. nOptVal : Numeric setting for SET action SET_TO.
  23.  
  24. SHORT:
  25.  
  26. 16 channel "timer & stopwatch."
  27.  
  28. DESCRIPTION:
  29.  
  30. _Timer() contains 16 individual timers (assigned to "channels").
  31.  
  32. KT_RESET resets a timer channel to ZERO.  Any previous time on that channel
  33. is lost.
  34.  
  35. KT_START starts the specified nChannel timer.  Time accumulates until a
  36. KT_STOP, or KT_SWITCH is issued.
  37.  
  38. KT_STOP stops a timer channel, but does not reset it's value. It remains
  39. stopped until a KT_START, or a KT_SWITCH to that channel is issued.
  40.  
  41. KT_READ reads the time on the specified timer channel.  If the timer is
  42. running, it continues to run after the KT_READ.  If it is stopped, it remains
  43. stopped.
  44.  
  45. KT_SET_TO causes the specified timer channel to be set to the time in
  46. currently in the timer channel specified in nSet.
  47.  
  48. KT_SWITCH causes all timers to be stopped, and the specified channel to be
  49. started.
  50.  
  51. KT_ASSIGN allows you to set a timer to a specific value.  Thus, a timer could
  52. continue to accumulate time through several separate runs of an application
  53. by saving the timer contents (retrieved by KT_READ) and, when the application
  54. is run again, setting the timer to it's previous value.  KT_ASSIGN sets the
  55. ELAPSED TIME to the specified value and clears the START and STOP time
  56. (effectively STOPPING the timer).  Thus, when you KT_ASSIGN a timer channel,
  57. you must also start it (if desired).
  58.  
  59.  
  60. Begin by KT_RESETing the desired channel to ZERO.  Then start and stop the
  61. timer as necessary.  At any point, you can obtain a reading of any given
  62. timer by KT_READing it.
  63.  
  64. You may also KT_SET_TO one timer to the current time on another channel. This
  65. will allow you to keep one overall time reading by way of multiple channels.
  66.  
  67. All 16 timers are intially assigned a ZERO time.
  68.  
  69. NOTE:
  70.  
  71.  
  72.  
  73. EXAMPLE:
  74.  
  75. See DEMOS\TIMER\MAIN.PRG for example.
  76.  
  77. ******************************************************************************/
  78.